package blog.jamiexu.cn.test;
import com.jamiexu.lua.interpreter.Lexer;
import com.jamiexu.lua.interpreter.token.Token;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {


    private static boolean isAlpha(char c) {
        return !(Character.isDigit(c) || Character.isLetter(c));
    }


    public static void main(String[] args) {
//        System.out.println(isAlpha('@'));
        Lexer lexer = null;
        try {
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(
                    new FileInputStream("F:\\Projects\\IdeaProjects\\Interpreter\\src\\test\\resources\\code.txt")));

            lexer = new Lexer(bufferedReader);
            Token token = lexer.getNextToken();
            while (token.type != Token.TYPE.EOF){
                System.out.println(token);
                token = lexer.getNextToken();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
//
    }


}
